package com.lixw.saa.config;

import com.lixw.saa.service.WeatherService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: McpServerConfig
 * @Description:
 * @Author: xuweiLi
 * @Create: 2025/10/4 16:58
 **/
@Configuration
public class McpServerConfig {
    @Bean
    public ToolCallbackProvider weatherTools(WeatherService weatherService) {
        return MethodToolCallbackProvider.builder().toolObjects(weatherService).build();
    }

}